# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-1-[% c("var/build_id") %].tar.gz'
version: 11.0
container:
  use_container: 1
var:
  setup: |
    mkdir -p /var/tmp/dist
    tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
    export sysrootdir=/var/tmp/dist/[% project %]/MacOSX[% c("version") %].sdk/
    export clangdir=/var/tmp/dist/[% project %]/clang
    export cctoolsdir=/var/tmp/dist/[% project %]/cctools/bin
    export PATH="$clangdir/bin:$cctoolsdir:$PATH"
    export LD_LIBRARY_PATH=/var/tmp/dist/[% project %]/clang/lib
    export CC="$clangdir/bin/clang [% c('var/FLAGS') %]"
    export LDFLAGS="[% c('var/LDFLAGS') %]"
    export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]

input_files:
  - project: container-image
  - name: clang
    project: clang
  - name: cctools
    project: cctools
  - name: cmake
    project: cmake
  - name: ninja
    project: ninja
  # Instructions on how to create the SDK tarball can be found at:
  # build/macosx/cross-mozconfig.common
  - name: SDK
    URL: 'https://people.torproject.org/~boklm/mirrors/sources/MacOSX[% c("version") %].sdk.tar.xz'
    sha256sum: 8cbe3a79e67b0690f931703ce5c282ac0c7265b451a36ec21cdfa9773f93173c
  - name: llvm-project
    project: llvm-project
  - filename: compiler-rt-cross-compile.patch
  - filename: compiler-rt-no-codesign.patch
